package com.yituo.mjworld.mvc.entity.other;

import javax.persistence.*;
import java.math.BigDecimal;

@Entity
@Table(name = "user_account", schema = "web_mojianworld_server", catalog = "")
public class UserAccount {
  private String userId;
  private BigDecimal restMoney;
  private BigDecimal realMoney;

  @Id
  @Column(name = "userId", nullable = false, length = 36)
  public String getUserId() {
    return userId;
  }

  public void setUserId(String userId) {
    this.userId = userId;
  }

  @Basic
  @Column(name = "restMoney", nullable = false, precision = 2)
  public BigDecimal getRestMoney() {
    return restMoney;
  }

  public void setRestMoney(BigDecimal restMoney) {
    this.restMoney = restMoney;
  }

  @Basic
  @Column(name = "realMoney", nullable = false, precision = 2)
  public BigDecimal getRealMoney() {
    return realMoney;
  }

  public void setRealMoney(BigDecimal realMoney) {
    this.realMoney = realMoney;
  }


  @Override
  public int hashCode() {
    int result = userId != null ? userId.hashCode() : 0;
    result = 31 * result + (restMoney != null ? restMoney.hashCode() : 0);
    result = 31 * result + (realMoney != null ? realMoney.hashCode() : 0);
    return result;
  }
}
